package heven.holt.eyepetizer.loading.delegate

import android.view.LayoutInflater
import android.view.ViewGroup
import heven.holt.eyepetizer.R
import heven.holt.eyepetizer.databinding.EyeHeadViewDelegateHomeBinding
import heven.holt.library.loading.LoadingStateView
import heven.holt.library.toast.toast
import javax.inject.Inject

class EyeHomeHeaderViewDelegate @Inject constructor() :
    LoadingStateView.ViewDelegate<LoadingStateView.ViewHolder>() {
    lateinit var binding: EyeHeadViewDelegateHomeBinding

    override fun onCreateViewHolder(
        inflater: LayoutInflater,
        parent: ViewGroup
    ): LoadingStateView.ViewHolder {
        binding = EyeHeadViewDelegateHomeBinding.inflate(inflater, parent, false)
        binding.ivSearch.setOnClickListener {
            //TODO 跳转搜索页
        }
        binding.ivCalendar.setOnClickListener { view ->
            toast(view.context.getString(R.string.currently_not_supported))
        }
        return LoadingStateView.ViewHolder(binding.root)
    }

    override fun onBindViewHolder(holder: LoadingStateView.ViewHolder) {
    }
}